//package com.sunshine.ssm.controller.system;
//
//import com.sunshine.ssm.system.IRedisService;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.RedisTemplate;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//import java.io.UnsupportedEncodingException;
//
///**
// * @Author: WeiHong
// * @Date: 2017/5/18 14:40
// */
//@Controller
//@RequestMapping(value = "redis")
//public class RedisController {
//
//    private static final Logger LOGGER = LoggerFactory.getLogger(RedisController.class);
//
//    @Autowired
//    private IRedisService redisService;
//
//    @Autowired
//    private RedisTemplate<String, Object> redisTemplate;
//
//    @RequestMapping(value = "setRedis")
//    public void setRedis() throws UnsupportedEncodingException {
//        //LOGGER.info("Redis 保存......");
//        //redisService.set("testKey", "testValue", 60);
//        //byte[] testKeys = redisService.get("testKey");
//        //String s = new String(testKeys, "UTF-8");
//        //System.out.println("s:" + s);
//        //System.out.println("----------------------------");
//        //Set<String> testKye = redisTemplate.keys("testKey");
//        //System.out.println("testKey" + testKye.toString());
//        //redisService.set("test1Key", "test1Value");
//        //System.out.println("----------------------------");
//        //byte[] test1Keys = redisService.get("test1Key");
//        //String s1 = new String(test1Keys, "UTF-8");
//        //System.out.println("s1" + s1);
//
//        /********消息发布***********/
//        //消息监听见：com.sunshine.ssm.redis.RedisListener
//        redisTemplate.convertAndSend("SEND_TEST","messageTest");
//    }
//
//
//
//}
